package com.example.taobaounion.utils

import com.example.taobaounion.net.Constants

/**
 *@author : Administrator
 *@descreption : 将id和page组成地址的工具类,
 */
class UrlUtil {
    companion object {
        fun getCategoryDataUrl(id: Int, page: Int): String {
            return "discovery/$id/$page"
        }
        fun getHttpsUrl(originalUrl:String):String{
            return if (!originalUrl.contains("http")){
                "https:${originalUrl}"
            }else{
                originalUrl
            }
        }

        fun getSelectCategoryContentDataUrl(categoryId:Int): String {
            return "recommend/$categoryId"
        }

    }
}